
#ifndef _SUPERFICIE_TRIANGULAR_H


#define _SUPERFICIE_TRIANGULAR_H

#include <stdio.h>
#include <vector>
#include "Indice.h"
#include "Vertice.h"
#include "Triangulo.h"
#include "Geometria.h"
#include "Borde.h"
#include "Enumeraciones.h"

using namespace::std;

class Superificie_Triangular : public Geometria
{
public:
	//Constructor
	Superificie_Triangular();
	Superificie_Triangular(char *filenamePuntos, char *filenameIndices);

	//Metodos
	void set_FnamePtosSupTriang(char* filename){charFnamePtosSupTriang = filename;}
	void set_FnameIndsSupTriang(char* filename){charFnameIndsSupTriang = filename;}
	void set_TiposSesion(TipoSesion se){enmSesionSup = se;}
	
	unsigned int get_NroTriangs(){return intNroTriangs;}
	unsigned int get_NroBordes(){return intNroBordes;}
	unsigned int get_NroVertices(){return intNroVertices;} 
	
	vector<Triangulo>& get_Triangulos(){return objTriangulos;}//REF
	vector<Vertice*> get_Vertices(){return objVertices;}   
	vector<Indice> get_Indices(){return objIndices;}
	vector<Borde>& getBordes(){return objBordes;}

	Vertice* get_Vertice(const int &i){return objVertices[i];}
	Triangulo& get_Triangulo(const int &i){return objTriangulos[i];}
	Borde& getOneBorde(int intNro){return objBordes[intNro];}

	
	void CargarSuperficieTriangular_2_0();
	void CargarSuperficieTriangular_1_0();
	void DeterminarConectividad();

private:
	//Atributos
	char *charFnamePtosSupTriang;
	char *charFnameIndsSupTriang;
	vector<Triangulo> objTriangulos;
	vector<Borde> objBordes;
	vector<Vertice*> objVertices;
	vector<Indice> objIndices;
	unsigned int intNroVertices;
	unsigned int intNroIndices;
	unsigned int intNroTriangs;
    unsigned int intNroBordes;
	TipoSesion enmSesionSup;

	void readstr(FILE *f, char *string);
};


#endif

